feat!: align flag names with lean-quickstart spec#321
feat!: align flag names with lean-quickstart spec#321conache wants to merge 7 commits intolambdaclass:mainfrom
Conversation
Greptile SummaryThis PR replaces the single
Confidence Score: 3/5Not safe to merge until One P1 defect: preview-config.nix — needs the five new flags in place of
|
| Filename | Overview |
|---|---|
| bin/ethlambda/src/main.rs | Replaces single --custom-network-config-dir flag with five explicit path flags; mapping logic and error handling are correct and consistent with previous behavior. |
| .claude/skills/devnet-runner/references/long-lived-devnet.md | All five docker run invocations (initial start + rolling-restart template) updated to the new flags consistently. |
| docs/checkpoint_sync.md | Example command updated correctly to use the five new flags; prose updated to remove the old flag reference. |
| docs/fork_choice_visualization.md | Example cargo run command updated correctly to use the five new flags. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["CLI Argument Parsing\n(clap::Parser)"]
CLI -->|"--genesis"| GP["options.genesis\n→ config_path\n(GenesisConfig)"]
CLI -->|"--validators"| VP["options.validators\n→ validators_path\n(annotated_validators.yaml)"]
CLI -->|"--bootnodes"| BP["options.bootnodes\n→ bootnodes_path\n(nodes.yaml)"]
CLI -->|"--validator-config"| VC["options.validator_config\n→ validator_config\n(validator-config.yaml)"]
CLI -->|"--hash-sig-keys-dir"| KD["options.hash_sig_keys_dir\n→ validator_keys_dir\n(hash-sig-keys/)"]
GP --> GC["parse GenesisConfig\n(serde_yaml_ng)"]
BP --> RB["read_bootnodes()"]
VC --> PR["populate_name_registry()"]
VP --> RV["read_validator_keys()"]
KD --> RV
GC --> FS["fetch_initial_state()"]
RB --> SW["build_swarm()"]
RV --> BC["BlockChain::spawn()"]
FS --> BC
Comments Outside Diff (1)
-
preview-config.nix, line 93 (link)Stale flag reference will break Nix node service
preview-config.nixstill passes--custom-network-config-dir genesisDirto the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (--genesis,--validators,--bootnodes,--validator-config,--hash-sig-keys-dir) each expect a full file/directory path derived fromgenesisDir.Prompt To Fix With AI
This is a comment left during a code review. Path: preview-config.nix Line: 93 Comment: **Stale flag reference will break Nix node service** `preview-config.nix` still passes `--custom-network-config-dir genesisDir` to the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (`--genesis`, `--validators`, `--bootnodes`, `--validator-config`, `--hash-sig-keys-dir`) each expect a full file/directory path derived from `genesisDir`. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: preview-config.nix
Line: 93
Comment:
**Stale flag reference will break Nix node service**
`preview-config.nix` still passes `--custom-network-config-dir genesisDir` to the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (`--genesis`, `--validators`, `--bootnodes`, `--validator-config`, `--hash-sig-keys-dir`) each expect a full file/directory path derived from `genesisDir`.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Merge branch 'main' into add-spec-compli..." | Re-trigger Greptile
Summary
Closes #287. Aligns CLI flags with the lean-quickstart spec.
Removed:
--custom-network-config-dirAdded:
--genesisconfig.yaml--validatorsannotated_validators.yaml--bootnodesnodes.yaml--validator-configvalidator-config.yaml--hash-sig-keys-dirhash-sig-keys/--genesis,--validators, and--bootnodesare mandated by the spec.--validator-configand--hash-sig-keys-dircover ethlambda-internal paths that the spec doesn't standardize.Coordination
Coordinated lean-quickstart PR: #321.
Testing
To verify the new flags locally:
Build the binary from this branch:
Inspect --help and confirm the new flags appear:
--genesis,--validators,--bootnodes,--validator-config, and--hash-sig-keys-dir--custom-network-config-dirshould no longer be presentTo boot the binary from the
lean-quickstartrepository:NETWORK_DIR=local-devnet ./spin-node.sh --node ethlambda_0 --generateGenesisThe binary parses succesfully parses all five flags.
Important note:
Local-devnet boot panics after parsing the CLI flags with the following error (confirmed it reproduces identically on
main):